<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>{{.title}}</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="data:image/png;base64,{{.logo}}" type="image/x-icon">
    <!-- Bootstrap 3.3.4 -->
    <link href="/public/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/public/css/pholcus.css" rel="stylesheet" type="text/css" />
    <script src="/public/js/jquery.min.js"></script>
    <script src="/public/bootstrap/js/bootstrap.min.js"></script>
    <script>
	    offline = ({{.mode.offline}});
	    server = ({{.mode.server}});
        client = ({{.mode.client}});
        unset = ({{.mode.unset}});
        _stopped = ({{.status.stopped}});
        _stop = ({{.status.stop}});
        _run = ({{.status.run}});
	    _pause = ({{.status.pause}});
    </script>
    <script src="/public/js/tpl.js"></script>
    <script src="/public/js/app.js"></script>
    <script src="/public/layer/layer.js"></script>
</head>

<body>
    <div class="backdrop">
        <div id="step1">
            <img src="data:image/png;base64,{{.logo}}" alt="pholcus" class="logo">
            <h1>Welcome to Pholcus</h1>
            <form class="form-horizontal" name="step1" method="GET" onsubmit="return Open('init');" enctype="multipart/form-data">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <!-- Small button group -->
                        <div class="btn-group">
                            <button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span id="js_mode">运行模式</span> <span class="caret"></span></button>
                            <ul class="dropdown-menu">
                                <li><a href="javascript:selectMode({{.mode.offline}});">单机模式</a></li>
                                <li><a href="javascript:selectMode({{.mode.server}});">服务端模式</a></li>
                                <li><a href="javascript:selectMode({{.mode.client}});">客户端模式</a></li>
                            </ul>
                            <input type="hidden" name="mode" id="mode" value="{{.mode.curr}}">
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="form-group config1 js_ip">
                            <label for="ip" class="col-sm-2 control-label">主节点</label>
                            <div class="col-sm-9">
                                <input type="text" name="ip" id="ip" class="form-control" onfocus="if(this.value == '{{.ip}}') this.value = ''" onblur="if(this.value =='') this.value = '{{.ip}}'" placeholder="{{.ip}}" value="{{.ip}}">
                            </div>
                        </div>
                        <div class="form-group config1 js_port">
                            <label for="port" class="col-sm-2 control-label">端口号</label>
                            <div class="col-sm-9">
                                <input type="number" name="port" id="port" class="form-control" onfocus="if(this.value == '{{.port}}') this.value = ''" onblur="if(this.value =='') this.value = '{{.port}}'" placeholder="{{.port}}" value="{{.port}}">
                            </div>
                        </div>
                        <div class="form-group config2">
                            <button type="submit" id="init" class="btn btn-primary">&nbsp;开&nbsp;&nbsp;启&nbsp;</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <script type="text/javascript">
            home();
        </script>
        <div class="footer">
            Github website: <a href="https://github.com/henrylee2cn/pholcus">Pholcus {{.version}}</a> / Author: {{.author}} / Discuss: <a href="http://shang.qq.com/wpa/qunwpa?idkey=83ee3e1a4be6bdb2b08a51a044c06ae52cf10a082f7c5cf6b36c1f78e8b03589">Go大数据群</a> / Apache License v2.
        </div>
        <!-- github -->
        <div>
            <script type="text/javascript" src="/public/js/jquery.githubRepoWidget2.js"></script>
            <div class="github-widget" data-repo="henrylee2cn/pholcus" style="margin:5px;"></div>
        </div>
    </div>
</body>

</html>
